package com.example.administrator.personalmail.retrofitAPI;

import android.telecom.Call;

import com.example.administrator.personalmail.model.Banner;
import com.example.administrator.personalmail.model.Category;
import com.example.administrator.personalmail.model.Page;
import com.example.administrator.personalmail.model.Wares;
import com.example.administrator.personalmail.msg.LoginRespMsg;
import com.example.administrator.personalmail.msg.User;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.adapter.rxjava.Result;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface GetRequest_Interface {
    @GET("wares/hot")
    retrofit2.Call<Page<Wares>> hotRequest(@Query("curPage") int curPage,@Query("pageSize") int pageSize);

    @GET("banner/query?type=1")
    retrofit2.Call<ArrayList<Banner>> bannerRequest();

    @GET("category/list")
    retrofit2.Call<List<Category>> categoryRequest();

    @GET("wares/list")
    retrofit2.Call<Page<Wares>> categorySecondRequest(@Query("curPage") int curPage,@Query("pageSize") int pageSize,@Query("categoryId") long categoryId);

    @GET("wares/campaign/list")
    retrofit2.Call<Page<Wares>> waresListRequest(@Query("curPage") int curPage,@Query("pageSize") int pageSize,@Query("campaignId") long campaignId,@Query("orderBy") long orderBy);

    @POST("auth/login")
    @FormUrlEncoded
    retrofit2.Call<LoginRespMsg<User>> login(@FieldMap Map<String,Object> map);
}
